﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TSP
{
    class TSPSolverRandom : ITSPSolver
    {
        public List<City> solveProblem(City[] input)
        {
            List<City> inputList = input.ToList<City>();
            List<City> cities = new List<City>();
            Random rand = new Random();
            while (inputList.Count >= 1)
            {
                int index = rand.Next(inputList.Count-1);
                City nextCity = inputList[index];
                cities.Add(nextCity);
                inputList.Remove(nextCity);
            }
            return cities;
        }
    }
}
